package com.yf.stack;

public class StackFrameTest {

    public static void main(String[] args) {
        StackFrameTest stackFrameTest = new StackFrameTest();
        try {
            stackFrameTest.m1();
        } catch (Exception e) {
            e.printStackTrace();
        }

        System.out.println("main方法执行完毕");
    }

    public void m1() {
        System.out.println("m1方法开始执行");
        m2();
        System.out.println("m1方法执行结束");
//        System.out.println(1 / 0);
    }

    public int m2() {
        System.out.println("m2方法开始执行");
        int i = (int) m3();
        System.out.println("m2方法即将结束");
        return i;
    }

    public double m3() {
        System.out.println("m3方法开始执行");
        double j = 2.0;
        System.out.println("m3方法开始执行");
        return j;
    }

}
